<template>
  <el-container>
    <el-header style="height: 80px;">
      <el-row>
        <el-col :span="8">
          <img src="@/assets/logo.png" width="140px" style="padding-top:10px; padding-left:20px;" />
        </el-col>
        <el-col :span="16" style="text-align: right; padding-right: 30px;">
          <el-dropdown>
            <i class="el-icon-setting" style="margin-right: 15px"></i>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>查看</el-dropdown-item>
              <el-dropdown-item>新增</el-dropdown-item>
              <el-dropdown-item>删除</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <span>李铁</span>
        </el-col>
      </el-row>
    </el-header>
    <el-container class="content-v">
      <el-aside class="aside">
        <el-menu
          default-active="/console/dashboard"
          class="el-menu-vertical-demo"
          style="border: 0"
          @open="handleOpen"
          @close="handleClose"
          :collapse="isCollapse"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
          :router="true"
        >
          <el-menu-item index="/console/dashboard">
            <i class="el-icon-menu"></i>
            <span slot="title">Dashboard</span>
          </el-menu-item>
        </el-menu>
        <div class="footer">&copy; 2020 张瑀楠</div>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  data () {
    return {}
  },
  computed: {
    userInfo () {
      return this.$store.state.userInfo
    },
    isLogin () {
      return this.$store.state.isLogin
    }
  },
  methods: {
    handleOpen (key, keyPath) {
      console.log(key, keyPath)
    },
    handleClose (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>

<style>

.footer {
  text-align: center;
  line-height: 60px;
  width: 200px;
  background-color: #545c64;
  color: #fecf57;
  clear:both;
  position:absolute;
  margin-top: -60px;
  bottom: 0px;
}

.aside{
  width: 200px !important;
  height: 100% !important;
  background-color: #545c64;
}

.el-container {
  height: 100%;
}

.el-header {
  height: 80px;
  background-color: white;
  line-height: 80px;
}

.el-header > span,
.el-header .el-dropdown {
  font-size: 18px;
}

.el-footer {
  background-color: #252d36;
  color: #ffc852;
  text-align: center;
  line-height: 60px;
}

.el-main {
  color: #333;
  text-align: center;
}
</style>
